//
//  ErrorShowTableViewCell.m
//  LPTClient
//
//  Created by apple on 2018/12/10.
//  Copyright © 2018 zhaodd. All rights reserved.
//

#import "ErrorShowTableViewCell.h"

@interface ErrorShowTableViewCell()


@property (nonatomic, weak) IBOutlet UILabel *descLab;
@property (nonatomic, weak) IBOutlet UIButton *imgButton;


@end


@implementation ErrorShowTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)showWithType:(ErrorShowtype)type
{
    NSString *descStr = @"";
    UIImage *img = nil;
    
    if (type == ErrorShowTypeSuccess) {
        descStr = @"审核成功";
        img = [UIImage imageNamed:@"aut_bg_success"];
    } else if (type == ErrorShowTypeEmpty) {
        descStr = @"暂无数据";
        img = [UIImage imageNamed:@"aut_bg_examine"];
    } else if (type == ErrorShowTypeInReview) {
        descStr = @"审核中";
        img = [UIImage imageNamed:@"aut_bg_examine"];
    } else if (type == ErrorShowTypeFailReview) {
        descStr = @"抱歉，审核未通过";
        img = [UIImage imageNamed:@"aut_bg_failed"];
    } else if (type == ErrorShowTypeNetError) {
        descStr = @"网络异常，请刷新重试";
        img = [UIImage imageNamed:@"bg_network"];
    }
    
    [self.imgButton setImage:img forState:UIControlStateNormal];
    self.descLab.text = descStr;
}

@end
